#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>

int  count_digits(char *str)
{
	int count = 0;
	for (int i = 0; i < strlen(str); i++)
	{
		if (str[i] >= '0' && str[i] <= '9')
		{
			count++;
		}
	}
	return count;
}

int main()
{
	char str[100];
	scanf("%s", str);
	int count = count_digits(str);
	printf("%d\n",count );
	return 0;
}